import service from '../utils/request'


// 1.专栏课程
// 列表
export function column_list(payload = {}) {
    return service.get('/columnlist', { params: payload })
}

// 模糊查询
export function column_search(payload = {}) {
    return service.get('/columnlist', { params: payload })
}

// 新增
export function column_add( payload = {} ){
    return service.post('/columnlist', payload );
}

// 更新
export function column_update( payload = {} ){
    return service.patch('/columnlist/'+payload.id, payload );
}

// 删除
export function column_delete( payload = {} ){
    return service.delete('/columnlist/'+payload.id, payload );
}



// 2.课程分类
// 列表
export function cate_list(payload = {}) {
    return service.get('/catelist', { params: payload })
}

// 模糊查询
export function cate_search(payload = {}) {
    return service.get('/catelist', { params: payload })
}

// 新增
export function cate_add( payload = {} ){
    return service.post('/catelist', payload );
}

// 更新
export function cate_update( payload = {} ){
    return service.patch('/catelist/'+payload.id, payload );
}

// 删除
export function cate_delete( payload = {} ){
    return service.delete('/catelist/'+payload.id, payload );
}


// 3.题库
// 列表
export function questions_list(payload = {}) {
    return service.get('/questionslist', { params: payload })
}

// 模糊查询
export function questions_search(payload = {}) {
    return service.get('/questionslist', { params: payload })
}

// 新增
export function questions_add( payload = {} ){
    return service.post('/questionslist', payload );
}

// 更新
export function questions_update( payload = {} ){
    return service.patch('/questionslist/'+payload.id, payload );
}

// 删除
export function questions_delete( payload = {} ){
    return service.delete('/questionslist/'+payload.id, payload );
}



// 4.试卷库
// 列表
export function tests_list(payload = {}) {
    return service.get('/testslist', { params: payload })
}

// 模糊查询
export function tests_search(payload = {}) {
    return service.get('/testslist', { params: payload })
}

// 新增
export function tests_add( payload = {} ){
    return service.post('/testslist', payload );
}

// 更新
export function tests_update( payload = {} ){
    return service.patch('/testslist/'+payload.id, payload );
}

// 删除
export function tests_delete( payload = {} ){
    return service.delete('/testslist/'+payload.id, payload );
}